import request from '@/utils/request'


export function listNowGrade() {
  return request({
    url: '/cph/grade/listNowGrade',
    method: 'get'
  })
}

export function listAllGrade() {
  return request({
    url: '/cph/grade/listAllGrade',
    method: 'get'
  })
}


// 查询年级列表
export function queryGrade(query) {
  return request({
    url: '/cph/grade/list',
    method: 'get',
    params: query
  })
}


// 查询年级列表
export function listGrade(query = null) {
  return request({
    url: '/cph/grade/list',
    method: 'get',
    params: query
  })
}



// 查询年级详细
export function getGrade(gradeId) {
  return request({
    url: '/cph/grade/' + gradeId,
    method: 'get'
  })
}

// 新增年级

export function addGrade(data) {
  return request({
    url: '/cph/grade',
    method: 'post',
    data: data
  })
}

// 修改年级

export function updateGrade(data) {
  return request({
    url: '/cph/grade/update',
    method: 'post',
    data: data
  })
}

// 删除年级

export function delGrade(gradeId) {
  return request({
    url: '/cph/grade/delete/' + gradeId,
    method: 'post'
  })
}
